TESTS=$(wildcard *.rb)

all: test-unit test-notimplemented

test-unit:
	#
	# UNIT TESTING
	#
	for test in $(TESTS); do \
		ruby $$test || exit 1 ; \
		done
	#
	# TESTING MISSING CODE
	#

test-notimplemented:
	TMP=`mktemp` ; \
		find ../lib -name '*.rb' |xargs grep -n 'NotImplementedError' > $$TMP ; \
		COUNT=`wc -l < $$TMP` ; \
		if [ $$COUNT -gt 0 ]; then \
		cat $$TMP 1>&2 ; \
		fi

